﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/admin.Master" AutoEventWireup="true"
    Inherits="Wjtour.Web.Admin.scene.resturantaddedi" %>

<%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
<%@ Import Namespace="Wjtour.Domain" %>
<%@ Import Namespace="Wjtour.Common" %>
<%@ Import Namespace="Wjtour.Domain.dto" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
    <table id="addeditable" border="1" cellpadding="0" cellspacing="0" bordercolor="#dddddd">
        <tr>
            <td width="115px" align="right">景点名称：
            </td>
            <td>&nbsp;<asp:TextBox ID="scenename" Width="300" runat="server" />
                <asp:HiddenField ID="sceneid" runat="server" />
            </td>
        </tr>
        <tr>
            <td align="right">餐馆名称：
            </td>
            <td>&nbsp;<asp:TextBox ID="resturantname" Width="300" runat="server" />
            </td>
        </tr>
        <tr>
            <td align="right">
                餐馆logo：
            </td>
            <td>
                &nbsp;<asp:TextBox runat="server" ID="img" Width="300" />
                <asp:FileUpload ID="upload" runat="server" />
                <asp:Button ID="btnPublish" runat="server"  Text="上传"/>
            </td>
        </tr>
        <tr>
            <td align="right">
                图片预览：
            </td>
            <td>
                &nbsp;<asp:Image runat="server" ID="imgPreview" ImageUrl="" />
            </td>
        </tr>
        <tr>
            <td align="right">餐馆地址：
            </td>
            <td>&nbsp;<asp:TextBox runat="server" ID="address" />
            </td>
        </tr>
        <tr>
            <td align="right">开放时间：
            </td>
            <td>&nbsp;<asp:TextBox runat="server" ID="opentime" Width="300" />
            </td>
        </tr>
        <tr>
            <td align="right">联系电话：
            </td>
            <td>&nbsp;<asp:TextBox runat="server" ID="contactphone" Width="300" />
            </td>
        </tr>
        <tr>
            <td align="right">容纳人数：
            </td>
            <td>&nbsp;<asp:TextBox runat="server" ID="holdmans" />
            </td>
        </tr>
        <tr>
            <td align="right">人均消费：
            </td>
            <td>&nbsp;<asp:TextBox runat="server" ID="averagecosume" />
            </td>
        </tr>
        <tr>
            <td align="right">交通指南：
            </td>
            <td>&nbsp;<asp:TextBox runat="server" TextMode="MultiLine" ID="trafficguide" Width="400" />
            </td>
        </tr>
        <tr>
            <td align="right">餐馆简介：<br /><br />
                        <span style="color:red;font-weight:bold;">F12放大和<br />缩小编辑框</span>
            </td>
            <td>&nbsp;
                <ce:editor id="introduce" runat="server" Height="860" width="790" />
            </td>
        </tr>
        <tr>
            <td align="right">&nbsp;
            </td>
            <td>&nbsp;<asp:Button ID="submit" runat="server" Text=" 保 存 " />
            </td>
        </tr>
    </table>
    <script type="text/javascript">
        $(function () {
            $("#<%=scenename.ClientID %>").autocomplete({
                source: "/admin/Ajax/GetSceneHandler.ashx",
                focus: function (event, ui) {
                    $("#<%=scenename.ClientID %>").val(ui.item.label);
                    return false;
                },
                select: function (event, ui) {
                    $("#<%=scenename.ClientID %>").val(ui.item.label);
                    $('#<%=sceneid.ClientID %>').val(ui.item.value);
                    return false;
                }
            }).data("autocomplete")._renderItem = function (ul, item) {
                if (item.label.indexOf($("#<%=scenename.ClientID %>").val()) > -1
                    || $("#<%=scenename.ClientID %>").val().trim() == '') {
                     return $("<li></li>")
                         .data("item.autocomplete", item)
                         .append($("<a></a>").text(item.label))
                         .appendTo(ul);
                 }
             };
        });

    </script>
</asp:Content>
